All Questions
49 questions
3votes
2answers
91views
Video Frame-by-Frame Deraining with MFDNet
After checking the repository of MFDNet, single image rain streaks removal with the provided model is given in test.py. I am trying to modify the code to process frame-by-frame rain streaks removal in ...
5votes
1answer
163views
4votes
2answers
174views
NumPy script to convert BGR to HSL and back
This is a NumPy script that converts BGR arrays to HSL arrays and back, without using OpenCV. Input and output values are arrays of 3 dimensions with values ranging from 0 to 1, the shape of the ...
2votes
1answer
789views
Matching corresponding masks of objects between 2 images
Here is a program that processes 2 grayscale images. Both represent the position of objects, in the form of multiple masks per image. Each mask is a shape with one color delimiting it, with 0 (or ...
7votes
1answer
940views
Create an image made of many circles
I have written some Python code for creating an image made of lots of circles. It works, but I wonder if it could be made faster, shorter or more pythonic somehow. Example image (took 28 seconds): <...
1vote
1answer
85views
Update image pixels based on different criteria
Problem statement: Assume a high resolution (> 3000 x 3000) image is given as input. The image pixels can be classified into one of the three categories namely text, background and drawing. There ...
1vote
1answer
58views
Correcting coordinates of an image with polynomial root in python
I want to optimize this for loop for correcting coordinates of an image, it takes too long which is not suited for my system. I have done some profiling, the numpy roots is taking most of the time (...
2votes
0answers
554views
Multi-threaded image convolution/pooling-python
This multi-threaded code takes an array of 3d images and applies the convolution function with padding, stride, pad values .. as parameters and same applies for creating pooling layers. I need ...
6votes
2answers
307views
Compressing large jpeg images
I'm working with thousands of large image files in a regularly updated library. The following script does the job (on average reduces my file size ~95%) but costs me around 25 seconds to compress one ...
2votes
0answers
59views
Generate Black and White confidence map masks for joints, same as OpenPose/Convolutional Pose Machines
Attached below is my code for generating the confidence maps for the joint locations, it is in the same vein as the maps generated for the paper Convolutional Pose Machines and OpenPose. I am ...
5votes
2answers
148views
Python image combiner reading writing
I am writing a simple script that will combine two images at a pixel level, selecting every other pixel from one image, and the other pixels from a second image. ...
1vote
1answer
312views
Add watermark to images
Recently, I started reading image processing via opencv library in python. I create a minio object storage and upload some photos into it. After that, I wrote a program which reads every image in ...
2votes
1answer
646views
Image Processing - Comparing 2 images and Ranking Similarity
My code compares 2 images of any shape/dimension and ranks them in order of similarity. It starts with reading from a CSV file with columns image1, image2 which contain absolute paths and then ...
9votes
1answer
4kviews
Bilinear image interpolation
I have written a bilinear interpolant, which is working moderately well except that is painfuly slow. How can rewrite the code to make it faster? Using opencv directly isn't a valid answer. ...
5votes
0answers
69views
Tensorflow loop to analyze gradients derived from MRI and PET images
The code shown below takes the partial derivative of each pixel of the output fused image of a neural network with respect to input image of the neural network using tensorflow's ...